package com.example.orderservice.client;

import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

@FeignClient(value ="account-service")
public interface AccountServiceClient {

    @RequestMapping(value="/account/deductMoney/{id}/{money}", method = RequestMethod.POST)
    Map<String,Object> deductMoney(@PathVariable int id, @PathVariable double money);

}
